make sure log dir exists when creating wrappers, fix #1662