Flush log before submitting.