Added Write IOC to String

for integration with other applications where string and not a file is easier to work with.