Remove old keyboard code
Improve error handling in fs calls