Proper julia-level I/O initialization

Fixes #2946
Fixes #3416