Check installation errors

In case of error the command and status code will be shown.
If --install-error-action=abort the installation will be aborted.
Proper flushing of install logs
Merge pull request #428 from fernandoacorreia/install-error-checking

Check installation errors