added validate_file
Merge pull request #5 from achiu8/controller_3

added validate_file