Fixed file bug in open_dev.