Output file creation added