Fix checking the validity of single files.