save record with more security and don't allow duplication