Added code for KEvent and KElectron
added lib to run scripts
chnaged when open outputfile