Added 'mode' as optional parameter when called printStackTrace(options) to improve usability in a testing environment.