use tika for mime type detection