Making sure we don't read from the file before it exists in test

Fixes a small issue during unit testing