made sure directories got emptied every time