three bugfixes
Store command output in separate file.

  * limits size of JSON file
  * makes it easier to review output with standard UNIX tools