print errors to stderr. fixes #3318