404 page and pid file fixes