There should be a generic IO layer for files/sockets/.... It should also be used for the logging support.