removed unnessesary guard from logger variable