Reinstate error trapping
Add wr to dependency list
Add Write Multiple support