proper argument parsing
properly set loglevel