[Rakefile] Restructure Rakefile to rescue LoadError