Added more checks, timeout, and persistence features