A simple utility to serialize an operation that uses multiple IO callbacks