define initFS and errorHandler earlier