added init file to middleware