Improve errors detection in PUT and GET