Unique Log file naming and on closing fix