fix crash when a file doesn't exit in static folder.

my bad, previous patch was buggy