fix unable to run script other than cwd
add erb templates