added primitive journaling. Needs fixup