adding check for path