NXP-15106: remove temporary files earlier if possible