added die flag file removal in wrapper, to prevent infinite loops