Add datetime to xjson. don't run finish methods if error was thrown.