add ability to handle string in addition to files