Added subprocess kill replacing call wherever posssible