Started adding log code