add -q option
move Error class to its own file; add pkz-avg script