script to find error, clean up output to be tab-delimited