Output redirection works but with 1 line of junk