Return proper status on exit