Complete FileController logic.

Complete FileController logic.