Add print and Fix bug

Add print and Fix bug