Better error handling, Clean code, Test PHP header

- :lipstick: Removing a blank line in code-context
- :lipstick: Clean some code (use of unless and co)
- Improve error handling with try/catch
- Errors are displayed in a Pane (like other errors of the package)
- Add a test before adding <?php