Bug fixing &

Bug fixing for errors in calculation during file download  and
implementation of MDEV for download files