Add more logging for monitor scripts