bugfix: prevent a segfault if state file is not defined