fix writter failed