Cleaned up logic for checking for custom files to upload.