Make error_on_bad_paths internal