Fixed bug with opening files in the /dev directory