finalized file read and line sort