You can refreeze food as long as you cooked it after thawing. Refreezing food which has thawed or partially thawed is dangerous since warming may have started off any bacteria in it to grow and multiply. The main danger comes from the toxins that the bacteria may produce as part of their metabolic processes, and re-freezing will not get rid of them.