Added debug (-d) flag to the command line interface.