replace puts with appropriate method call

Please review @nathanhumbert and @rantler