changing file opening to use storage