added printing of exception info, useful for debugging
added support for token replacement for post_json action