Relocated the event handler for file open

Relocated the file open event handler to the controller instead of the
service.