Added sending to stderr for error messages