Added print function with variable field length.