adding more debug info for easier troubleshooting
returning length of metrics if nothing failed