add trap methods for FactoryGirl and device