Add verbose output and better error handling; actually initialize the timeout value (oops!).