fix reference to environment in file function
split file() spec tests properly
reference environment properly
rewrite new spec tests for file function to work properly