Error logging store database. Code logic commited. Antony