handle more properly case where putfile is not a string
0.5.6