added a fix for deprecated hr attributes, and printing error messages to STDOUT instead of STDERR