Bugfix: fixed error for files whose mimetype cannot be guessed.