Ensures that writing has completed before closing the file channel
Updated ferox version