The variable $showfile is used in my template to display the file depending on the usergroup ids pull from the DB. Instead of it showing any files it is blank. I remove the $showfile if condition and it works so I know the showfile variable is causing the issue, its not rendering the usergroup ids as existent or something.