added options to generate context; context.json may be overwritten; secret_key is preserved;