Just thinking that maybe an assertion of "not null command" will throw a clearer exception that IOException for that case