Fix puts newlines, use Fileutils