Clean trailing whitespace
require "socket" for s3 output