Updated file handling logic to use jar file