Fixed crash-bug in logging setup