bugfix: put pid in file