feature #1664: Improve datastore creation