Move $script_path initialisation in else block
Fix lint issues