fixed file upload checks