stdlib: add new IO functions
stdlib: introduce ResourceScope