Create Ext.cs

extentions for writeappstarted and writeappexit