fixed issue of gaps in plan, optimization while costs parsing, and overwritten initial file