Wrap generating wrappers and appending variables to try-catches and promises