layers: If layers receive bad filename for output log, report ERROR and fallback to stdout
diff --git a/layers/mem_tracker.cpp b/layers/mem_tracker.cpp
index 3517b10..2b82c66 100644
--- a/layers/mem_tracker.cpp
+++ b/layers/mem_tracker.cpp
@@ -1308,6 +1308,8 @@
             log_output = fopen(option_str, "w");
         }
         if (log_output == NULL) {
+            if (option_str)
+                cout << endl << "MemTracker ERROR: Bad output filename specified: " << option_str << ". Writing to STDOUT instead" << endl << endl;
             log_output = stdout;
         }