code cleanup + save cookie if ROOT_PATH/download folder exist