Added log hook