adding logging control