Fixes; error checks; log buffer on unrecognized commands