Added file parameter to constructr