Added file validation