warnless: add wrapper function for read and write on Windows