Instead of abusing stdin and stdout, use our own file pointers. Check for errors when closing the output.
Instead of abusing stdin and stdout, use our own file pointers.
Check for errors when closing the output.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase