Improved log file handling. Prevent generation of persistence DB when persistence disabled.