only add the path when it is safe