updated file reader