bugfix where filenames were not checked on vality.

WORKING BUILD