Fix status updates

Further to #66 and deploying table xtract to cope with colspans
we need to fix the name of the file which is updated. Took the 
opportunity to refactor the state so it's correctly updated in
case of exceptions.