add bash shebang, fix echo command and redirect error output to devnull