Stream wrapper register need to be disabled on shutdown (core dumped)