readfromfile bugfix