erroneous logMessage function