new method to convert file to string of binary data