Fix the json output bug

Fix the bug that there is no steps info in script's json output.
Fix the bug that there is no type info in step's json output.