Test: save string to file