Added validation of file