handle rebar input with a FSM on the Erlang side