on closing the logging file descriptor some parts of the program still had the old reference. This will replace the old fd with stderr to fix errors raised
If an exception now is thrown in one of the middlewares we will get a proper traceback instead of a cut off one like before