Bremsstrahlung X-rays as a non-invasive tool for ion beam monitoring