Added check on curl response