increased seek offset before read
corrected fail/pass flow and added some comments and file close fixes