Improve the logs management of the shard script.