Added method for setup of default logsettings.

Added auto closing of stream after writing loglines to logfile