Add environment to file state error

Just a little enhancement to error reporting.