This might not be as tricky as I think. I've written a tracing module which I am now using in another project. The tracing module opens a local file descriptor and file and then writes tracing information to the file whenever the TRACING::TRACE() function is called in the 'other' project. <br><br>However, I have noticed problems, especially when reading from STDIN, that traced strings are not getting written to the trace file (until the program stops or at certain parts of the script). <br><br>Should I be flushing the strings written to the tracing file descriptor with every call? If so what would people suggest as the best method? I would like to keep the tracing module as small, fast and simple as possible for maintainence reasons.<br><br>Cheers!<br>Loon