Added console logs for debugging