removed some log statements and added one write statement