Add print command, fix few printing problems