path cleanup and download button