Added file opening functionality