Added catch for DirectoryNotFoundException.