Adding in error handler
Refactoring file operations and shim loading