FileStream now accepts a resource as argument