Version 1.2. Add writelines method. Bug fixes