Fixes #1392. Redirects error messages to stderr so users can see them.