Fix some issues

add printing of process result
fix resolving of token