More explicit error message when unable to open local file for write