fix file validation