Improved timeout exception handling