use cerr to output the error instead of stdout