print stack trace when falling back to java
add javadoc