added outpu file option