writer fixes

fixed write location and some parameters associated with raw.