use JSON_PRETtY_PRINT when debug enabled
fix typo _scripts_options => _script_options