to check for the capturefile in routine and correct the bug