For a new_resource id is returned to be nil. So ignoring the check for null. Also the -notrunc is deprecated. moving it to --no-trunc.