MAINT: more carefully preserve dtypes through log when possible, with tests