LPS-38516 cut/paste from start to end (no changes)
LPS-38516 Added buffering and write condition
LPS-38516 SF
LPS-38516 Adding null check (Not related to the bug)