use logger rather than printing error