Fixed log of downloads with PHP < 5.5 and typos.