modify the client function:
1 extract the http response header to distinguish the different return,
2 if the 201 NOK , Don't write to the file , just give user a info.