cpu: check whether output file has been successfully opened for writing
cpu: check whether output file has been successfully opened for writing

Signed-off-by: Sven Verdoolaege <e5350bbed4977f5eb8ae1dc6abd9ae59d21ace75@kotnet.org>

Meinersbur/ppcg,nicolasvasilache/ppcg,nicolasvasilache/ppcg,Meinersbur/ppcg