Fix trailing spaces
Use a logger instead of print
Allow empty values if the field is not required