bugfix: race condition on file load