Added ability to set write options to specific file