uploading check for diags

I refactored my code and I'm now checking for diags