Fix handling of invalid pid files in launcher