Debug messages and JNI native functions