Wrap log save in thread.

This is throwing a bunch of errors, needs more work.