Added the possibility to write log data to a file