Handle timeouts. Make sure that errors are reported properly.
Optimised imports