My schoolboy mistake. Thank you, [Adam](https://forum.dlang.org/post/mbbampewwcrkkltjlmij@forum.dlang.org)! On Saturday, 21 May 2022 at 11:17:04 UTC, Alain De Vos wrote: > Or you could capture a sigint and close the file then. Yes, exactly, I was thinking in this direction. Probably not quite correctly implemented in practice.