file sending fixes.  edge case fixes