make script more robust

and add unit test with blast report with bad heat header.