Updated the curl function and added print statements.