changed get file thing to use unsigned char