need to make sure we open in binary mode