Improved get_body rake task algorithm