fix download problem, change checking page to be more efficient, adding debugging lines to codes