fixed logging and test