finish output