after appears to be after the transaction is rolled back, so detect state changes then
Add current_state method and log_dir config
Remove initialise method
Add after block that writes the current state to a log file. Remove snapshot/detecting from this file.