show error on fail write
Merge pull request #55 from mclear/fail-reason

show error on fail write