Added aggregate commands and file download

- Added support for data aggregation function
- Added file download function - file content returned from the
function and can be saved to file with file_put_content()