Improve file mime type detection