Added error message if encoding of the uploaded file is incorrect. Improved error message and fixed comment typo.