refactoring to base class
module_eval will give file when there is an error