writing ouput to files