The manage-prints command would close the device twice when the user
hits an invalid number or 'n' and no prints need to be deleted.
Simply remove the erroneous call to fix the issue.
While there are various functions which similar usage in all the examples,
I'd prefer to keep each example to be self-containing most of the things.
However some clearly repeated action can be moved to a single codebase.