Yes. We should definitely have a better error message when that function is invoked wrongly. Things like "no .el files in this directory" or "this file lacks a version header".