@rmaddy's comment above is correct. Just moving it into an answer.
You need to add an observer on your DBFile
to get notified when it changes. What's happening is that your app is being restarted and your immediately checking the status, but since the app just started, it hasn't had time yet to talk to the server and learn about the newer file content. An observer on the DBFile
will fire as soon as the app is able to communicate with the server and find out about the change.