Changed a little bit the structure of readFile