added a check on the code dowload