add: when production mode, use to_s and raise error