added checks for paths