refactor shebangs usage to helper lib