Should probably enclose the constructor in a try-catch block and remember to close/delete the file if an exception is thrown.