fix import to 3.1rc
Fix pid file handling in mongo script