Try to handle non-form messages better
Added some error handling, if `file` can't read the encoding (actually it was giving errors because no read permission)