add enable write stdout switch support