Fixing error messages on CURL call