Fixed a deadlock between the project and the VideoEngine::refreshTree function.
Also in debug mode the writing process is now writing to stdout to have a significant output.