Added some exception handling & Stats