Change open file call to support best practices