checking if device is mounted before trying to mount it