use fprintf() instead of puts() to avoid 'ignored return values' error of splint