Now checks if device is initialized/opened or not to prevent segfault