print putObject errors instead of crashing