Added check path functionality