Working version

Major fix to the spout to not close files and not to depend on reliable execution.