Add more debug logging for print command