You can only declare variable immediately after the begin statement. Here, you have the macro call and the call to write_seq.start before the declaration and initalisation of item.
The following fixes the error but there are others.
// Overflow test
begin
fifo_seq_item item;
write_seq = fifo_write_seq::type_id::create("write_seq");
`uvm_info("FIFO_TEST", "Starting overflow test", UVM_LOW)
write_seq.start(env.agent.sequencer);
item = fifo_seq_item::type_id::create("item");
Maybe just revert to the original and move `uvm_info and write_seq.start further down.