Added error checks & meters for local storage size