Created logging to seperate logging functions