use bash for support -n option on echo
cleanup the script