Changed how the logger works with files.