script to pipe traceback from an error into a file