fix bug undefined method file