Bug fixes
Error messages now sent to stderr