This function is weird. You check for FileSizeLimitReached and you get rid of camel casing. Why is that? If msg is different of FileSizeLimitReached then we don't emit event?? I cannot understand what this function does. Your JSDoc is noisy. Explains the trivial that I can understand by reading the code and omits the weird behavior that need to be explained