Fixed up edge case with path, added check for successful response