Demonstration of common standard output / error redirection pattern flaws and the remedy