More improvements to the file check script