usefull io-related stuff. Would be nice to fold into other projects