+ thread safe stdio version