using file::magic to get mime type