adds exception handler if directory is not available at host