improved export script output with printf