Improved timeout code

Removed some duplication and extended the timeout in consideration of all files being processed; seems to make more sense.