Handling error when cwd does not exist