Added more logging and a default onCommit handler