Corrected entry: A device that works by reading the human brain wouldn't record the afterlife as that by definition transcends human bodily experience and occurs in another plane of existence. The movie could clear this if at any point the characters acknowledged they'd accidentally created a supernatural device that doesn't actually work the way they thought it did at all, but as is the story seems to confuse the human mind (which is dependent on the physical brain) with the human soul.
Correction: This is a fictional device that operates exactly as the filmmakers say it does. Whether it works as you think it should is irrelevant.
This is 100% true, but that doesn't mean it wouldn't be a plot hole, it just means the audience doesn't mind that it doesn't strictly make sense.
Correction: The device actually does cease to record anything once the user has died and all brain activity has ended: it's not that the device itself can suddenly see into "the other side" somehow, but rather it's picking up the brain's experience in the midst of death, whether induced by spiritual means or simply a dream-like interpretation by the mind.
TonyPH