Added log code