fix output while load php configs (add output buffering) + move error exception handling