check exit code of wget