add logic of checking the resume file