completed adding and calling mutexes to lock specific bytes inside resume file.