fixed read from file