Make curl commands conditional on non-existance, fix typo