try..catch to avoid string formatting errors