Adding console logs for debugging.