added logging cmd line switch