Split IO to SRT files into separate functions