fixed connect call in controller
fixed function capitalization
fixed close file call