Khushal: added at exit block to destroy headless