Attempt to close file handle on failed log replay.

Closes #303.