text file and binary handling added