Added multiple entries handling

I have encountered an issue with your script which created two entries for a server and finally it was flooding the database with new entries