Made working dir protected

useful for logging and troubleshooting.