Encapsulate handler function invocations in gen_cop_handler module