Print the query on cerr, along with the error message when