catch Timeout exception

After adding the timeout code we need to catch the Timeout exception.

Note: Think we are still missing the rollup after an error occurs. At this moment the metrics are lost.