Removing while loop on read/write operation
Updating the portslist should happen before ResizeAndDispose