Fix reading files