changed dir structure. got attachments writing.