Bug fix: close streams in compute-core