Only accept a Pathname or String as the filename param