Add strict check for file type