toJSON: Added file dialogs