added startup proceeder /open or create file)
fixed bug in event emit order