Made logging async