Hi, @Arshpreet_Singh, welcome to the forum. I’m not exactly sure what you mean about the goroutine not being able to run asynchronously, but I see a potential issue with your StartLogs function: It defers closing the log file. This means that when the logger is returned to the caller of StartLogs, the logger’s destination file is closed, and I’m not sure what will happen when an attempt is made to write a log message after that. I recommend changing your StartLogs function to something similar to this: