started log test
refactor logging into separate module
send statemachine response to client