Changing position for opening the deviceFile