second implementation of saving recorded track to file