Add queue support for file write