Replaced direct console output with logging in fsm