use a escript to build the executable instead a bash script, some comments