move main under cmd directory so the base dir can be used for common good