how to download the file when changing the subtype of file to be xxxx?

Hello buddy's

 I have changed the file subtype to xxxx and when i upload the file it gets updated successfully , when downloading it throws

500 internal server error . I have changed the file subtype => xxxx other coding is same as elgg core .

for downloading i have passed the value to this page

/file/download/(guid of my file ).

I am getting error on this place when i check with code