added option to send a file stream for large files