Cleaner empty dir cleanup
Quality guess keyerror. fix #3347