Added additional check for if path exists.