check if search path exists before setting it