add logging, test new flatmap from 1.0.3