Snapshot of commit d5ec1d5018ed24f1b4f32b1d09df6dbd7e2fc425

from branch master of git://git.jetbrains.org/idea/community.git
diff --git a/native/MacLauncher/utils.m b/native/MacLauncher/utils.m
new file mode 100644
index 0000000..63c3922
--- /dev/null
+++ b/native/MacLauncher/utils.m
@@ -0,0 +1,30 @@
+#include "utils.h"
+
+NSString *readFile(NSString *path) {
+    NSError *err = nil;
+    NSString *contents = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&err];
+    if (contents == nil) {
+        debugLog([NSString stringWithFormat:@"Reading at %@ failed, Error is: %@", path, err.localizedDescription]);
+        return nil;
+    }
+
+    debugLog([NSString stringWithFormat: @"Reading at %@ OK", path]);
+
+    return contents;
+}
+
+NSString *trim(NSString *line) {
+    return [line stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@" \t"]];
+}
+
+BOOL isDebugEnabled() {
+    return getenv("IDEA_LAUNCHER_DEBUG") != NULL;
+}
+
+void debugLog(NSString *message) {
+    if (isDebugEnabled()) {
+        NSLog(@"%@", message);
+    }
+}
+
+