better error message in case test_file is passed an invalid operator