Adding a stdout print lock