fixed file extension bug in file controller