Updating score and adding DB error detection