Add CIException.writeTo(File)

used for the soon to come global log file.