[BUGFIX] Check for existence of file object before trying to get identifier