auto-detect file type when compare