Added fix to check filename