adjusted file access to make less platform dependent