Fixed crash when filename can't be parsed