Added a debug option to print command log.