map write and quit