Added WriteError to main interface

Added .gitignore

Fixed writeerror

Fixed import