improve logging, add monitoring script