Merge pull request #446 from ndawe/master

[MRG] io.file improvements: context preservation