Add support to sequence file both read and write, and fix dependency problem.