added methods for creating a byte array from a file