Added break statement when marking more than 5000 stars to avoid writing logger warning many times.