bugfix err file name handling