When file is closed manually. Layout stays open and hence layout_region variable causes problems.
When file is closed manually. Layout stays open and hence layout_region variable causes problems.