Got rid of multiple copies of send_file helper function.