removed xml files and empty dirs, added block to ensure dirs exist