Fix check file type issue.