added transformer func to factory (like in cache), fixed error output