Remove duplicate call mg_stat (Part 2)
 - add function mg_send_file_internal