fixed an error with the variables, redirected outputs to devnull