Added execption handling for loggin initialization

If logging can not start (ie. loggin file is not writable), script will exit.
This is to avoid a state where script is running but nothing is logged (as nothing is send to stdout).