Ensure crashes folder exists before writing file