fixed directory creation order on ec2