displaying better error message if user tries to upload a file in an unsupported format