added 'b' to open stemcell in binary mode to suppress CR/LF conversion on Windows