added 2> stderr redirection functionality