modify api base url path
add error mesage
bug fixes

- add create backup directory code
- modify invalid location check