file checks in scripts