Moved timeout_seconds outside the begin-rescue-end block