adding log hook