start up application when document is ready