Further JNIF bugfixes and error reporting.