Moved last succesful build check so that it renames the folder