Updated decorator to use functools.update_wrapper