Improve the query editor, Add restore editor function when the application is crash.