Module:FileExists

return function(file_name) local success, result pcall(function(file) return mw.title.new(file).fileExists end, file_name)

if success and result then return true else return false end end