refactoring for a clean rake when warnings are on