Fixed bug causing seg. fault in go to end of file. Added few printouts.