modified header and usage message
added parameter for appName
use function for printing help message