Ensure consistency after failed filesystem operations