make sure messages get to the connection. added feature to save log files