1. fix read corrupted large file bug.
2. remove some redundant code.