Update srt files writing function