Added default timeout so script won't hang forever