Remove empty fields after split to ensure fields match what's expected.
Added printf support.