Improved error reporting in 'put'.