Added a check if specified path exists.