file logging can be turned off

Using the library multiple times in a multuithreaded application leads to problems due to all instances logging to the same file. With this changes the logging is by default switched on but it can be dsiabled if not needed.