Improve writing across multiple files.
Updated tests.
PR cleanup.
Cleaned up test.
Merge pull request #245 from arb/log-cleanup

Improve writing across multiple files.