added verbose writing