fixed logging and basic request handling