added crash safety for file loads

Signed-off-by: Lennard Wasserthal <Wasserthal@nefkom.net>