modified sw logging to file