nitg: Added C stack trace when encountering an error

Support for plain C stack trace when encountering an error in nitg.