The real solution that I found for this issue was by disabling any XML Format post processors. I have added a post processor called "jp@gc - XML Format Post Processor
" and started noticing the error "Fatal Error :1:1: Content is not allowed in prolog
"
By disabling the post processor had stopped throwing those errors.