Remove the duplicate file resource xlogdir (already done at line 22 outside this ifstatement)