broke out curl options setup; added debug logging since this relies on an external library and some extra info is needed for when it breaks in the future