Adding logging. Handle PUTS and POSTS.