Added a control clause for invalid paths.