Add -f flag to curl, to improve error handling, as suggested in #244.