adding file validation