Generate binary files with erlang