add console log information, error check