reading binary and ascii files