Added logging class and wrapper function.