Implemented output download functionality.