Fix init function to use file instead of jarfile