Make sure we always log the exit line

If there's an exception, we might not write the final lines to the log.
Put those in a finally block.

Change-Id: I0a294af3874c53543176a7bd9c4b89253717b83c
1 file changed