implemented file writer opener and roll logic