More consistent logging between agent processes fix #792