Added basic support for resumable databases and corrupted logfile recovery.