Bugs with file input fixed