Added lseek( 0 ) to gen chunks