Added logging for the end of the process