Fix json export error. Log errors in www to file.
Don't output comma unless a previous entry exists.