added errors
Merge pull request #7 from pilu/errors

added errors
flushes dest on putc