refactor path setting for erlang