Added error handling on write, now displays a message in browser if a save operation fails (e.g. file is read only).