When I try to download previously uploaded excel or word document in resources or file manager, it opens in gebrish text. This doesn't happen if I try to download the same file using ftp.
Finally found the problem. for some reason, there were tons of blank lines in config.php which caused that problem. removed the extra lines, and problem solved