add checking args and some logs