Changed error reporting from using the standard error stream to using logging supported by M+M.