added bad path handling