Add checkPath method