optimize copy, mkdir