fix errorHandler in middleware
changed storeFiles is now fm