Adding logging and some content adjustment