added unit test for valid_file boolean method