Moved s3 code into fifo_util.