Your sprintf arguments are backwards I think.