Extended timeout to close and better working directory