improve bash script template