Added very basic logging to muonlab
Only close device if there *is* a device