initial support for long-running scripts and better cross-platform file handling