added logging before and after PUT and POST 2