Fixed anti replication bug. I needed to fil.close the I/O stream