command line wrapper and smart buffer helper routines