Changed error reporting from using the standard error stream to using YARP logging.