Consolidated log statements into one log in function calculateTrainCompletion.