Implement basic TM log and recovery