Remove generated files on possible errors