Fixed the read() operation and the size of regular file.