file storage log formatting with sprintf