Updated write test and added write-only.sql