print the stackTrace instead of return null
add some doc