Fixed bug that warning message should be stderr and not be written to json.