fixed minor bug for redirecting output to stdout