fixed 2 small issues with writing null files, and a small issue with log level sets at runtime