IO: don't use deprecated mimeType property
IO: fixed wrong logic in mimeType handling