Support for logging to a textfile