1) provided proper format parameters during logging ( replaced %s with %d where appropriate)
2) added testFinalizeWhenEditsAreMissed test case to TestJournal
3) closing stream only when scoped_ptr points to proper object