Moved stopping the app into before_symlink so pid can be found