wait for file to exist before getting size in porting system