Added a read-string function to allow parsing strings directly rather than writing data to disk