fixing issue with sending msgs when file exists