Changes writeMessage to writeProcessMessage