fix singleton when using a subclass
add --osc-debug option
print message for unexpected states

shouldn't happen in practice but maybe testsuite
mock test