The filename doesn't have to be string, it can also be a file resource,