Revert "Handle error when closing files."

This reverts commit 468b32397d98b0fff59dc965f77419c419676f7c.