Close output I/O after Messages::FINISH is completely written