add debug option which print input and output. new version of cfg file.