fix restore location
extract `lib_bash.sh`