Clean up a debug code and add a new function which will replace file_get_contents() with a cURL command