Added custom error handler to throw ErrorExceptions for warnings
If custom error handler is active file manipulation functions will all throw ErrorExceptions for warnings

- Added deleteFile function
Updated file emitter to handle Exceptions and return appropriate warnings