Fixed an issue where files with no fileobject failed.