added path check and changed test slightly