file validation fixed