Fileobjects were not getting their filetypes assigned correctly