Continued work for write test and changed logging slightly.
Before smoketest logging refactor