Changed error to print out to stderr