Make linux fs work, add key error check