handling redirection, nicer output