Added --debug mode to commands for full logging.