Added option to close path