bin/cdecl: move print of STDOUT/STDERR before the exit