Refactoring of verbose flag and device state service method