I think the issue is with the toString('binary')