fixed ret value in write context errors
fixed the hosts configuration