Changed fileToBytes and response() to use Option with pattern matching