fix(write to csv): raise the exception so we know what failed

Add raise so when the write csv method gives the stack when it fails.