Logs are not collected everywhere

When the plugin installation fails, no logs are added to the error.txt or logs.txt. This is due to child process where is don't catch the error but just wait for it to complete