added exception catch debug