Added logging to files instead of console