Fixed bug where we were trying to open a file handler