Fix bugs for generating configuration file.
Small fix in gnuoutput
Added debugmess when leaving functions
Show correct debugmess.