fix error handling; factor initialisation together
add csv dialect inference