str to file