Prevent silent macro crash on print

Macros would silently crash on print("[window]","\\command") if window
was not open.  Now it logs and moves on with the macro.