improve errors logging in foitext-parse.php