optimization code in FileController by remark Dmitriy Gudz