make getParent() thread safe
jni: better error message in log when can't load libraries, indent/reformat code (no logic changes)