fix message sending and stop logging to file