Fix error message when test path is invalid