status withfile function