Got a work-around.
Lost th 'str_cpe line and opened the file
'fi_handle = file_open_write("sd\\fi.txt");'
Its not ideal or what the manual says but it works!