Print last line from swift when process dies