Implemented readFile(). Bug are present and documented in code.