Calling close device on plugin stopped