Implement adding attributes using Dictionary.
Change CR to LF, add writeToFile: method.