make sure logger is set first