Refined the app locking mech

Updated docs.