removed folders before writing