fix undeclared use of cerr