Implement progress callback function