Added filetype handling via mime type recognition