let struct to a global define
let code more sense

* rename variable line_path to line_app_path
* when got except, return error