Do mime type detection