Check file mime type with finfo function