There are two threads, one of them is writing file only if there is no content/file. Second thread will read msg content only if content is there in file.
Progress so