check path first